package asteroids.model.programs.Expression;

import be.kuleuven.cs.som.annotate.Basic;
import asteroids.model.Entity;
/**
* 
* @version 0.3
* @author  Tandan Sunil, Van Deun Luca
*
*/
public class EntityLiteral extends EntityExpression {

	public EntityLiteral(int line, int column, Entity entity) {
		super(line, column);
		setEntity(entity);
	}

	
	private Entity entity;
	
	/**
	 * Returns the entity of this entityLiteral.
	 */
	@Basic
	public Entity getEntity(){
		return entity;
	}

	@Override
	public void setEntity(Entity entity) {
		if(canHaveAsEntity(entity))
			this.entity=entity;
		
	}

	@Override
	public boolean canHaveAsEntity(Entity entity) {
		return entity!=null;
	}


}
